package com.zzc.qqchat.config;

import com.zzc.qqchat.util.LoginHandlerInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class MyMvcConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new LoginHandlerInterceptor()).addPathPatterns("/**")
                .excludePathPatterns("/log","/login","/css/**","/js/**","/img/**","/myinfor","/message/friends","/buildlist","/grouplist",
                        "/addlist","/buildgroup");
    }
}
